Skip to content

Instantly share code, notes, and snippets.

@cobyism
cobyism / gh-pages-deploy.md
Last active June 3, 2024 14:28
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@pbrocks
pbrocks / install-phpcs-with-homebrew.md
Last active June 3, 2024 14:27
Install phpcs with Homebrew

Install phpcs with Homebrew

To set up php linting, you’ll want to install this PHP CodeSniffer repo and configure with this WordPress Coding Standards repo: . There are a number of ways to do this, whether direct download, Composer, Homebrew, Pear, etc. The following is what works for me on MacOS using Homebrew:

In a terminal window on your Mac, start by updating your Homebrew.

brew doctor

Then install the Code Sniffer:

@lopspower
lopspower / README.md
Last active June 3, 2024 14:25
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@tallclair
tallclair / kubectl-cp.sh
Last active June 3, 2024 14:23
kubectl cp equivalents
# Copy /tmp/foo_dir local directory to /tmp/bar_dir in a remote pod in the default namespace
kubectl cp /tmp/foo_dir <some-pod>:/tmp/foo_dir
tar cf - /tmp/foo_dir | kubectl exec -i <some-pod> -- tar xf -
# Copy /tmp/foo local file to /tmp/bar in a remote pod in a specific container
kubectl cp /tmp/foo <some-pod>:/tmp/foo -c <specific-container>
tar cf - /tmp/foo | kubectl exec -i <some-pod> -c <specific-container> -- tar xf -
# Copy /tmp/foo local file to /tmp/bar in a remote pod in namespace <some-namespace>
kubectl cp /tmp/foo <some-namespace>/<some-pod>:/tmp/foo
@josethz00
josethz00 / sr-frontend-interview-questions-answered.md
Last active June 3, 2024 14:22
Sr. Frontend Interview Questions

Senior Frontend Interview Questions

Some questions about frontend development that might be in your next job interview. The questions were formulated by @mauvieira, a super senior fullstack developer

General Frontend

  • What are the strategies we can use to optimize the performance of web applications?

    • CDNs, GraphQL (maybe) to reduce overfetching, improve backend performance, use SSR and/or SSG, lazy loading for loading assets only when it's needed, minimize and compress HTML, CSS and JS files, and optimize images by compressing and resizing them.
  • What are Web Vitals (LCP, FID, CLS)? And how are they applied in the real world?

@koconder
koconder / graph_agent.md
Created December 5, 2023 08:39
LLM Prompt for Graph Agent

You are a document to graph generation assistant. You task is to meticulously take some high level concepts, entities and summary of a research paper in JSON and convert this into a graph.

  • You will respond back only in JSON with nodes and edges
  • You will take a JSON of entities, summary and arguments for a given research paper and convert into a graph to better understand the relationship of the ideas
  • You will breakdown larger terms into smaller ideas where possible
  • You will ensure that all the nodes and edges are connected, if not you will connect them
  • If you are still unable to connect all the nodes and edges, you will connect these to the core/main idea
  • You will not make assumptions and only stick to the information provided

Please be critical and discerning in your evaluations.

@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active June 3, 2024 14:19
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session
@ianyfchang
ianyfchang / hg19.chrlen
Created May 16, 2014 07:40
HG19 Chromosome Length File
chr1 249250621
chr1_gl000191_random 106433
chr1_gl000192_random 547496
chr2 243199373
chr3 198022430
chr4 191154276
chr4_ctg9_hap1 590426
chr4_gl000193_random 189789
chr4_gl000194_random 191469
chr5 180915260
@jebaird
jebaird / hosts to ip host
Last active June 3, 2024 14:18
generate ip host config list form the host file at http://someonewhocares.org/hosts/ . Useful for blocking adds, spyware and shocks sites for whole networks
<?php
/*
* Hosts to ip host
*
* @author Jesse Baird <jebaird@gmail.com>
* @date 12/21/2012
*
* Licensed under The MIT License
* http://opensource.org/licenses/MIT
*